home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / programer2 / gnust / test / intmath < prev    next >
Text File  |  1991-09-13  |  838b  |  51 lines

  1. "Test integer math operations"
  2.  
  3. "======================================================================
  4. |
  5. | Copyright (C) 1988, 1989  Steven B. Byrne.
  6. | All rights reserved.
  7. |
  8.  ======================================================================"
  9.  
  10. ^3!
  11.  
  12. ^-3!
  13.  
  14. "Base tests"
  15. ^2r1010!
  16. ^8r377!
  17. ^16rFE!
  18.  
  19. "Arithmetic operation tests"
  20.  
  21. ^3 + 4!                "should return 7"
  22.  
  23. ^3 - 4!                "should return -1"
  24.  
  25. ^3 < 4!                "should return true"
  26.  
  27. ^17 > 18!            "should return false"
  28. ^17 > 17!            "should return false"
  29.  
  30. ^23 <= 23!            "true"
  31. ^23 <= -45!            "false"
  32. ^18 >= 21!            "false"
  33. ^19 >= 18!            "true"
  34.  
  35. ^23 = 23!            "true"
  36. ^23 = 24!            "false"
  37.  
  38. ^45 ~= 89!            "true"
  39. ^45 ~= 45!            "false"
  40.  
  41. ^3 * 4!                "should return 12"
  42.  
  43. ^12 / 3!            "should return 4"
  44.  
  45. ^12 / 5!            "should return 2"
  46.  
  47. ^-12 / 5!            "should return -3?"
  48. ^12 / -5!            "should return -3?"
  49.  
  50. " ### need more tests"
  51.